package guoanmaker.personal.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.personal.business.model.PersonalIpstatistics;
/**
 * 
* @ClassName: PersonalAppraiseRepository 
* @Description: 评价repository
* @author Yvonne_MGL
* @date 2017年7月20日 下午3:16:56 
*  
 */
public interface PersonalIpstatisticsRepository extends JpaRepository<PersonalIpstatistics, String>, JpaSpecificationExecutor<PersonalIpstatistics>{
	@Query("select p from PersonalIpstatistics p where p.ip=:ip and p.type=:type and date_format(p.datetime,'%y-%m-%d')=date_format(now(),'%y-%m-%d')")
	List<PersonalIpstatistics> selectIpstatisticsByIp(@Param("ip") String ip,@Param("type") int type);
	
	
}
